
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>3.4 Kafka 消费过程分析 · 大数据 Fulume 课堂笔记</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content=" 李振超">
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-expandable-chapters-small/expandable-chapters-small.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-page-toc-button/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-prism/prism-solarizedlight.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-tbfed-pagefooter/footer.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-change_girls/girls.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
        <link rel="stylesheet" href="../styles/website.css">
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="35-xiao-fei-zhe-zu-an-li.html" />
    
    
    <link rel="prev" href="33-zookeeper-cun-chu-jie-gou.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    
    
        
        <li>
            <a href="http://www.atguigu.com/" target="_blank" class="custom-link">联系我们</a>
        </li>
    
    

    
    <li class="divider"></li>
    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    第 1 章 Kafka 概述
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1.1" data-path="../11-xiao-xi-dui-lie.html">
            
                <a href="../11-xiao-xi-dui-lie.html">
            
                    
                    1.1 消息队列
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.1.2" data-path="../12-wei-shi-yao-xu-yao-xiao-xi-dui-lie.html">
            
                <a href="../12-wei-shi-yao-xu-yao-xiao-xi-dui-lie.html">
            
                    
                    1.2 为什么需要消息队列
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.1.3" data-path="../13-shi-yao-shi-kafka.html">
            
                <a href="../13-shi-yao-shi-kafka.html">
            
                    
                    1.3 什么是 Kafka
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.1.4" data-path="../14-kafka-jia-gou.html">
            
                <a href="../14-kafka-jia-gou.html">
            
                    
                    1.4 Kafka 架构
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../chapter1.html">
            
                <a href="../chapter1.html">
            
                    
                    第 2 章 Kafka 集群部署
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="../chapter1/21-xia-zai-kafka.html">
            
                <a href="../chapter1/21-xia-zai-kafka.html">
            
                    
                    2.1 下载 Kafka
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="../chapter1/22-bu-shu.html">
            
                <a href="../chapter1/22-bu-shu.html">
            
                    
                    2.2 部署
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="../chapter1/23-kafka-chang-yong-ming-ling-cao-zuo.html">
            
                <a href="../chapter1/23-kafka-chang-yong-ming-ling-cao-zuo.html">
            
                    
                    2.3 Kafka 常用命令操作
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../di-3-zhang-kafka-gong-zuo-liu-cheng-fen-xi.html">
            
                <a href="../di-3-zhang-kafka-gong-zuo-liu-cheng-fen-xi.html">
            
                    
                    第 3 章 Kafka 工作流程分析
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="31-kafka-sheng-cheng-guo-cheng-fen-xi.html">
            
                <a href="31-kafka-sheng-cheng-guo-cheng-fen-xi.html">
            
                    
                    3.1 Kafka 生产过程分析
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="32-broker-bao-cun-xiao-xi.html">
            
                <a href="32-broker-bao-cun-xiao-xi.html">
            
                    
                    3.2 broker 保存消息
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="33-zookeeper-cun-chu-jie-gou.html">
            
                <a href="33-zookeeper-cun-chu-jie-gou.html">
            
                    
                    3.3 Zookeeper 存储结构
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.3.4" data-path="34-kafka-xiao-fei-guo-cheng-fen-xi.html">
            
                <a href="34-kafka-xiao-fei-guo-cheng-fen-xi.html">
            
                    
                    3.4 Kafka 消费过程分析
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.5" data-path="35-xiao-fei-zhe-zu-an-li.html">
            
                <a href="35-xiao-fei-zhe-zu-an-li.html">
            
                    
                    3.5 消费者组案例
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../di-4-zhang-api-shi-zhan.html">
            
                <a href="../di-4-zhang-api-shi-zhan.html">
            
                    
                    第 4 章 API 实战
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="../di-4-zhang-api-shi-zhan/41-huan-jing-zhun-bei.html">
            
                <a href="../di-4-zhang-api-shi-zhan/41-huan-jing-zhun-bei.html">
            
                    
                    4.1 环境准备
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="../di-4-zhang-api-shi-zhan/42-kafka-sheng-chan-zhe-api.html">
            
                <a href="../di-4-zhang-api-shi-zhan/42-kafka-sheng-chan-zhe-api.html">
            
                    
                    4.2 Kafka 生产者 API
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="../di-4-zhang-api-shi-zhan/43-kafka-xiao-fei-zhe-api.html">
            
                <a href="../di-4-zhang-api-shi-zhan/43-kafka-xiao-fei-zhe-api.html">
            
                    
                    4.3 Kafka 消费者 API
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.3.1" data-path="../di-4-zhang-api-shi-zhan/43-kafka-xiao-fei-zhe-api/431-kafka-xiao-fei-zhe-zhi-gao-ji-api.html">
            
                <a href="../di-4-zhang-api-shi-zhan/43-kafka-xiao-fei-zhe-api/431-kafka-xiao-fei-zhe-zhi-gao-ji-api.html">
            
                    
                    4.3.1 Kafka 消费者之高级 API
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3.2" data-path="../di-4-zhang-api-shi-zhan/43-kafka-xiao-fei-zhe-api/432-kafka-xiao-fei-zhe-zhi-di-ji-api.html">
            
                <a href="../di-4-zhang-api-shi-zhan/43-kafka-xiao-fei-zhe-api/432-kafka-xiao-fei-zhe-zhi-di-ji-api.html">
            
                    
                    4.3.2 Kafka 消费者之低级 API
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="../di-5-zhang-lan-jie-qi.html">
            
                <a href="../di-5-zhang-lan-jie-qi.html">
            
                    
                    第 5 章 拦截器
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="../51-lan-jie-qi-yuan-li.html">
            
                <a href="../51-lan-jie-qi-yuan-li.html">
            
                    
                    5.1 拦截器原理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="../52-lan-jie-qi-an-li.html">
            
                <a href="../52-lan-jie-qi-an-li.html">
            
                    
                    5.2 拦截器案例
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="../di-6-zhang-kafka-stream.html">
            
                <a href="../di-6-zhang-kafka-stream.html">
            
                    
                    第 6 章 Kafka stream
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="../di-6-zhang-kafka-stream/61-gai-shu.html">
            
                <a href="../di-6-zhang-kafka-stream/61-gai-shu.html">
            
                    
                    6.1 概述
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2" data-path="../di-6-zhang-kafka-stream/62-kafka-stream-shu-ju-qing-xi-an-li.html">
            
                <a href="../di-6-zhang-kafka-stream/62-kafka-stream-shu-ju-qing-xi-an-li.html">
            
                    
                    6.2 Kafka Stream 数据清洗案例
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="../di-7-zhang-kuo-zhan.html">
            
                <a href="../di-7-zhang-kuo-zhan.html">
            
                    
                    第 7 章 扩展
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.1" data-path="../di-7-zhang-kuo-zhan/71-kafka-he-flume-ji-cheng.html">
            
                <a href="../di-7-zhang-kuo-zhan/71-kafka-he-flume-ji-cheng.html">
            
                    
                    7.1 Kafka 和 Flume 比较
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2" data-path="../di-7-zhang-kuo-zhan/72-kafka-he-flume-ji-cheng.html">
            
                <a href="../di-7-zhang-kuo-zhan/72-kafka-he-flume-ji-cheng.html">
            
                    
                    7.2 Kafka 和 Flume 集成
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3" data-path="../di-7-zhang-kuo-zhan/73-kafka-pei-zhi-xin-xi.html">
            
                <a href="../di-7-zhang-kuo-zhan/73-kafka-pei-zhi-xin-xi.html">
            
                    
                    7.3 Kafka 配置信息
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.3.1" data-path="../di-7-zhang-kuo-zhan/73-kafka-pei-zhi-xin-xi/731-broker-pei-zhi-xin-xi.html">
            
                <a href="../di-7-zhang-kuo-zhan/73-kafka-pei-zhi-xin-xi/731-broker-pei-zhi-xin-xi.html">
            
                    
                    7.3.1 broker 配置信息
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.2" data-path="../di-7-zhang-kuo-zhan/73-kafka-pei-zhi-xin-xi/732-producer-pei-zhi-xin-xi.html">
            
                <a href="../di-7-zhang-kuo-zhan/73-kafka-pei-zhi-xin-xi/732-producer-pei-zhi-xin-xi.html">
            
                    
                    7.3.2 Producer 配置信息
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.3" data-path="../di-7-zhang-kuo-zhan/73-kafka-pei-zhi-xin-xi/733-consumer-pei-zhi-xin-xi.html">
            
                <a href="../di-7-zhang-kuo-zhan/73-kafka-pei-zhi-xin-xi/733-consumer-pei-zhi-xin-xi.html">
            
                    
                    7.3.3 Consumer 配置信息
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >3.4 Kafka 消费过程分析</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="34-kafka-&#x6D88;&#x8D39;&#x8FC7;&#x7A0B;&#x5206;&#x6790;">3.4 Kafka &#x6D88;&#x8D39;&#x8FC7;&#x7A0B;&#x5206;&#x6790;</h1>
<h2 id="341-&#x6D88;&#x8D39;&#x8005;&#x548C;&#x6D88;&#x8D39;&#x8005;&#x7FA4;&#x7EC4;">3.4.1 &#x6D88;&#x8D39;&#x8005;&#x548C;&#x6D88;&#x8D39;&#x8005;&#x7FA4;&#x7EC4;</h2>
<p>&#x5047;&#x8BBE;&#x6211;&#x4EEC;&#x6709;&#x4E00;&#x4E2A;&#x5E94;&#x7528;&#x7A0B;&#x5E8F;&#x9700;&#x8981;&#x4ECE;&#x4E00;&#x4E2A; Kafka &#x4E3B;&#x9898;&#x8BFB;&#x53D6;&#x6D88;&#x606F;&#x4E95;&#x9A8C;&#x8BC1;&#x8FD9;&#x4E9B;&#x6D88;&#x606F;&#xFF0C;&#x7136;&#x540E;&#x518D;&#x628A;&#x5B83;&#x4EEC;&#x4FDD;&#x5B58;&#x8D77;&#x6765;&#x3002; </p>
<p>&#x5E94;&#x7528;&#x7A0B;&#x5E8F;&#x9700;&#x8981;&#x521B;&#x5EFA;&#x4E00;&#x4E2A;&#x6D88;&#x8D39;&#x8005;&#x5BF9;&#x8C61;&#xFF0C;&#x8BA2;&#x9605;&#x4E3B;&#x9898;&#x5E76;&#x5F00;&#x59CB;&#x63A5;&#x6536;&#x6D88;&#x606F;&#xFF0C;&#x7136;&#x540E;&#x9A8C;&#x8BC1;&#x6D88;&#x606F;&#x4E95;&#x4FDD;&#x5B58;&#x7ED3;&#x679C;&#x3002;</p>
<p>&#x8FC7;&#x4E86;&#x4E00;&#x9635;&#x5B50;&#xFF0C; &#x751F;&#x4EA7;&#x8005;&#x5F80;&#x4E3B;&#x9898;&#x5199;&#x5165;&#x6D88;&#x606F;&#x7684;&#x901F;&#x5EA6;&#x8D85;&#x8FC7;&#x4E86;&#x5E94;&#x7528;&#x7A0B;&#x5E8F;&#x9A8C;&#x8BC1;&#x6570;&#x636E;&#x7684;&#x901F;&#x5EA6;&#xFF0C;&#x8FD9;&#x4E2A;&#x65F6;&#x5019;&#x8BE5;&#x600E;&#x4E48;&#x529E;&#xFF1F;&#x5982;&#x679C;&#x53EA;&#x4F7F;&#x7528;&#x5355;&#x4E2A;&#x6D88;&#x8D39;&#x8005;&#x5904;&#x7406;&#x6D88;&#x606F;&#xFF0C; &#x5E94;&#x7528;&#x7A0B;&#x5E8F;&#x4F1A;&#x8FDC;&#x8DDF;&#x4E0D;&#x4E0A;&#x6D88;&#x606F;&#x751F;&#x6210;&#x7684;&#x901F;&#x5EA6;&#x3002; &#x663E;&#x7136;&#xFF0C; &#x6B64;&#x65F6;&#x5F88;&#x6709;&#x5FC5;&#x8981;&#x5BF9;&#x6D88;&#x8D39;&#x8005;&#x8FDB;&#x884C;&#x6A2A;&#x5411;&#x4F38;&#x7F29;&#x3002; &#x5C31;&#x50CF;&#x591A;&#x4E2A;&#x751F;&#x4EA7;&#x8005;&#x53EF;&#x4EE5;&#x5411;&#x76F8;&#x540C;&#x7684;&#x4E3B;&#x9898;&#x5199;&#x5165;&#x6D88;&#x606F;&#x4E00;&#x6837;&#xFF0C; &#x6211;&#x4EEC;&#x4E5F;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;&#x591A;&#x4E2A;&#x6D88;&#x8D39;&#x8005;&#x4ECE;&#x540C;&#x4E00;&#x4E2A;&#x4E3B;&#x9898;&#x8BFB;&#x53D6;&#x6D88;&#x606F;&#xFF0C;&#x5BF9;&#x6D88;&#x606F;&#x8FDB;&#x884C;&#x5206;&#x6D41;&#x3002;</p>
<p>&#x8FD9;&#x6837;&#x591A;&#x4E2A;&#x6D88;&#x8D39;&#x8005;&#x4ECE;&#x540C;&#x4E00;&#x4E2A;&#x4E3B;&#x4F53;&#x8BFB;&#x53D6;&#x6D88;&#x606F;, &#x5C31;&#x7EC4;&#x6210;&#x4E86;&#x6D88;&#x8D39;&#x8005;&#x7EC4;.</p>
<p>Kafka &#x6D88;&#x8D39;&#x8005;&#x4ECE;&#x5C5E;&#x4E8E;&#x6D88;&#x8D39;&#x8005;&#x7FA4;&#x7EC4;&#x3002; <my>&#x4E00;&#x4E2A;&#x7FA4;&#x7EC4;&#x91CC;&#x7684;&#x6D88;&#x8D39;&#x8005;&#x8BA2;&#x9605;&#x7684;&#x662F;&#x540C;&#x4E00;&#x4E2A;&#x4E3B;&#x9898;&#xFF0C;&#x6BCF;&#x4E2A;&#x6D88;&#x8D39;&#x8005;&#x63A5;&#x6536;&#x4E3B;&#x9898;&#x4E00;&#x90E8;&#x5206;&#x5206;&#x533A;&#x7684;&#x6D88;&#x606F;&#x3002;</my></p>
<p><img src="http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/1541737469.png-atguiguText" alt="">
<img src="http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/1541737487.png-atguiguText" alt="">
<img src="http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/1541737502.png-atguiguText" alt="">
<img src="http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/1541737525.png-atguiguText" alt=""></p>
<p>&#x5F80;&#x7FA4;&#x7EC4;&#x91CC;&#x589E;&#x52A0;&#x6D88;&#x8D39;&#x8005;&#x662F;&#x6A2A;&#x5411;&#x4F38;&#x7F29;&#x6D88;&#x8D39;&#x80FD;&#x529B;&#x7684;&#x4E3B;&#x8981;&#x65B9;&#x5F0F;&#x3002;</p>
<p>Kafka &#x6D88;&#x8D39;&#x8005;&#x7ECF;&#x5E38;&#x4F1A;&#x505A;&#x4E00;&#x4E9B;&#x9AD8;&#x5EF6;&#x8FDF;&#x7684;&#x64CD;&#x4F5C;&#xFF0C;&#x6BD4;&#x5982;&#x628A;&#x6570;&#x636E;&#x5199;&#x5230;&#x6570;&#x636E;&#x5E93;&#x6216; HDFS&#xFF0C;&#x6216;&#x8005;&#x4F7F;&#x7528;&#x6570;&#x636E;&#x8FDB;&#x884C;&#x6BD4;&#x8F83;&#x8017;&#x65F6;&#x7684;&#x8BA1;&#x7B97;&#x3002;&#x5728;&#x8FD9;&#x4E9B;&#x60C5;&#x51B5;&#x4E0B;&#xFF0C;&#x5355;&#x4E2A;&#x6D88;&#x8D39;&#x8005;&#x65E0;&#x6CD5;&#x8DDF;&#x4E0A;&#x6570;&#x636E;&#x751F;&#x6210;&#x7684;&#x901F;&#x5EA6;&#xFF0C;&#x6240;&#x4EE5;&#x53EF;&#x4EE5;&#x589E;&#x52A0;&#x66F4;&#x591A;&#x7684;&#x6D88;&#x8D39;&#x8005;&#xFF0C;&#x8BA9;&#x5B83;&#x4EEC;&#x5206;&#x62C5;&#x8D1F;&#x8F7D;&#xFF0C;&#x6BCF;&#x4E2A;&#x6D88;&#x8D39;&#x8005;&#x53EA;&#x5904;&#x7406;&#x90E8;&#x5206;&#x5206;&#x533A;&#x7684;&#x6D88;&#x606F;&#xFF0C;&#x8FD9;&#x5C31;&#x662F;&#x6A2A;&#x5411;&#x4F38;&#x7F29;&#x7684;&#x4E3B;&#x8981;&#x624B;&#x6BB5;&#x3002;</p>
<p>&#x6211;&#x4EEC;&#x6709;&#x5FC5;&#x8981;&#x4E3A;&#x4E3B;&#x9898;&#x521B;&#x5EFA;&#x5927;&#x91CF;&#x7684;&#x5206;&#x533A;&#xFF0C;&#x5728;&#x8D1F;&#x8F7D;&#x589E;&#x957F;&#x65F6;&#x53EF;&#x4EE5;&#x52A0;&#x5165;&#x66F4;&#x591A;&#x7684;&#x6D88;&#x8D39;&#x8005;&#x3002;&#x4E0D;&#x8FC7;&#x8981;&#x6CE8;&#x610F;&#xFF0C;<my>&#x4E0D;&#x8981;&#x8BA9;&#x6D88;&#x8D39;&#x8005;&#x7684;&#x6570;&#x91CF;&#x8D85;&#x8FC7;&#x4E3B;&#x9898;&#x5206;&#x533A;&#x7684;&#x6570;&#x91CF;&#xFF0C;&#x591A;&#x4F59;&#x7684;&#x6D88;&#x8D39;&#x8005;&#x53EA;&#x4F1A;&#x88AB;&#x95F2;&#x7F6E;</my>.</p>
<p>&#x4E0D;&#x540C;&#x4E8E;&#x4F20;&#x7EDF;&#x7684;&#x6D88;&#x606F;&#x7CFB;&#x7EDF;&#xFF0C;&#x6A2A;&#x5411;&#x4F38;&#x7F29; Kafka &#x6D88;&#x8D39;&#x8005;&#x548C;&#x6D88;&#x8D39;&#x8005;&#x7FA4;&#x7EC4;&#x5E76;&#x4E0D;&#x4F1A;&#x5BF9;&#x6027;&#x80FD;&#x9020;&#x6210;&#x8D1F;&#x9762;&#x5F71;&#x54CD;&#x3002;</p>
<hr>
<p>&#x5F53;&#x7136;&#x4E5F;&#x53EF;&#x4EE5;&#x591A;&#x4E2A;&#x6D88;&#x8D39;&#x8005;&#x7FA4;&#x7EC4;&#x6D88;&#x8D39;&#x540C;&#x4E00;&#x4E2A;&#x4E3B;&#x9898;:</p>
<p><img src="http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/1541737773.png-atguiguText" alt=""></p>
<hr>
<h2 id="342-&#x6D88;&#x8D39;&#x8005;&#x7FA4;&#x7EC4;&#x548C;&#x5206;&#x533A;&#x518D;&#x5E73;&#x8861;">3.4.2 &#x6D88;&#x8D39;&#x8005;&#x7FA4;&#x7EC4;&#x548C;&#x5206;&#x533A;&#x518D;&#x5E73;&#x8861;</h2>
<p>&#x7FA4;&#x7EC4;&#x91CC;&#x7684;&#x6D88;&#x8D39;&#x8005; &#x5171;&#x540C;&#x8BFB;&#x53D6;&#x4E3B;&#x9898;&#x7684;&#x5206;&#x533A;&#x3002; </p>
<p>&#x4E00;&#x4E2A;&#x65B0;&#x7684;&#x6084;&#x8D39;&#x8005;&#x52A0;&#x5165;&#x7FA4;&#x7EC4;&#x65F6;&#xFF0C;&#x5B83;&#x8BFB;&#x53D6;&#x7684;&#x662F;&#x539F;&#x672C;&#x7531;&#x5176;&#x4ED6;&#x6D88;&#x8D39;&#x8005;&#x8BFB;&#x53D6;&#x7684;&#x6D88;&#x606F;&#x3002; </p>
<p>&#x5F53;&#x4E00;&#x4E2A;&#x6D88;&#x8D39;&#x8005;&#x88AB;&#x5173;&#x95ED;&#x6216;&#x53D1;&#x751F;&#x5D29;&#x6124;&#x65F6;&#xFF0C;&#x5B83;&#x5C31;&#x79BB;&#x5F00;&#x7FA4;&#x7EC4;&#xFF0C;&#x539F;&#x672C;&#x7531;&#x5B83;&#x8BFB;&#x53D6;&#x7684;&#x5206;&#x533A;&#x5C06;&#x7531;&#x7FA4;&#x7EC4;&#x91CC;&#x7684;&#x5176;&#x4ED6;&#x6D88;&#x8D39;&#x8005;&#x6765;&#x8BFB;&#x53D6;&#x3002; </p>
<p>&#x5728;&#x4E3B;&#x9898;&#x53D1;&#x751F;&#x53D8;&#x5316;&#x65F6;&#xFF0C;&#x6BD4;&#x5982;&#x7BA1;&#x7406;&#x5458;&#x6DFB;&#x52A0;&#x4E86;&#x65B0;&#x7684;&#x5206;&#x533A;&#xFF0C; &#x4F1A;&#x53D1;&#x751F;&#x5206;&#x533A;&#x91CD;&#x5206;&#x914D;&#x3002;</p>
<p>&#x5206;&#x533A;&#x7684;&#x6240;&#x6709;&#x6743;&#x4ECE;&#x4E00;&#x4E2A;&#x6D88;&#x8D39;&#x8005;&#x8F6C;&#x79FB;&#x5230;&#x53E6;&#x4E00;&#x4E2A;&#x6D88;&#x8D39;&#x8005;&#xFF0C;&#x8FD9;&#x6837;&#x7684;&#x884C;&#x4E3A;&#x88AB;&#x79F0;&#x4E3A;&#x518D;&#x5747;&#x8861;&#x3002; </p>
<p>&#x518D;&#x5747;&#x8861;&#x975E;&#x5E38;&#x91CD;&#x8981;&#xFF0C;&#x5B83;&#x4E3A;&#x6D88;&#x8D39;&#x8005;&#x7FA4;&#x7EC4;&#x5E26;&#x6765;&#x4E86;&#x9AD8;&#x53EF;&#x7528;&#x6027;&#x548C;&#x4F38;&#x7F29;&#x6027;.</p>
<hr>
<h2 id="343-&#x6D88;&#x8D39;&#x65B9;&#x5F0F;">3.4.3 &#x6D88;&#x8D39;&#x65B9;&#x5F0F;</h2>
<p><my>consumer&#x91C7;&#x7528;pull&#xFF08;&#x62C9;&#xFF09;&#x6A21;&#x5F0F;&#x4ECE;broker&#x4E2D;&#x8BFB;&#x53D6;&#x6570;&#x636E;&#x3002;</my> &#x4E5F;&#x5C31;&#x662F;&#x8BF4;&#x662F;&#x6D88;&#x8D39;&#x8005;&#x4E3B;&#x52A8;&#x4ECE; topic &#x4E2D;&#x83B7;&#x53D6;&#x6570;&#x636E;.</p>
<p>push&#xFF08;&#x63A8;&#xFF09;&#x6A21;&#x5F0F;&#x5F88;&#x96BE;&#x9002;&#x5E94;&#x6D88;&#x8D39;&#x901F;&#x7387;&#x4E0D;&#x540C;&#x7684;&#x6D88;&#x8D39;&#x8005;&#xFF0C;&#x56E0;&#x4E3A;&#x6D88;&#x606F;&#x53D1;&#x9001;&#x901F;&#x7387;&#x662F;&#x7531; broker &#x51B3;&#x5B9A;&#x7684;&#x3002;&#x5B83;&#x7684;&#x76EE;&#x6807;&#x662F;&#x5C3D;&#x53EF;&#x80FD;&#x4EE5;&#x6700;&#x5FEB;&#x901F;&#x5EA6;&#x4F20;&#x9012;&#x6D88;&#x606F;&#xFF0C;&#x4F46;&#x662F;&#x8FD9;&#x6837;&#x5F88;&#x5BB9;&#x6613;&#x9020;&#x6210; consumer &#x6765;&#x4E0D;&#x53CA;&#x5904;&#x7406;&#x6D88;&#x606F;&#xFF0C;&#x5178;&#x578B;&#x7684;&#x8868;&#x73B0;&#x5C31;&#x662F;&#x62D2;&#x7EDD;&#x670D;&#x52A1;&#x4EE5;&#x53CA;&#x7F51;&#x7EDC;&#x62E5;&#x585E;&#x3002;&#x800C; pull &#x6A21;&#x5F0F;&#x5219;&#x53EF;&#x4EE5;&#x6839;&#x636E; consumer &#x7684;&#x6D88;&#x8D39;&#x80FD;&#x529B;&#x4EE5;&#x9002;&#x5F53;&#x7684;&#x901F;&#x7387;&#x6D88;&#x8D39;&#x6D88;&#x606F;&#x3002;</p>
<p>&#x5BF9;&#x4E8E;Kafka&#x800C;&#x8A00;&#xFF0C;pull &#x6A21;&#x5F0F;&#x66F4;&#x5408;&#x9002;&#xFF0C;&#x5B83;&#x53EF;&#x7B80;&#x5316; broker &#x7684;&#x8BBE;&#x8BA1;&#xFF0C;consumer &#x53EF;&#x81EA;&#x4E3B;&#x63A7;&#x5236;&#x6D88;&#x8D39;&#x6D88;&#x606F;&#x7684;&#x901F;&#x7387;&#xFF0C;&#x540C;&#x65F6; consumer &#x53EF;&#x4EE5;&#x81EA;&#x5DF1;&#x63A7;&#x5236;&#x6D88;&#x8D39;&#x65B9;&#x5F0F;&#x2014;&#x2014;&#x5373;&#x53EF;&#x6279;&#x91CF;&#x6D88;&#x8D39;&#x4E5F;&#x53EF;&#x9010;&#x6761;&#x6D88;&#x8D39;&#xFF0C;&#x540C;&#x65F6;&#x8FD8;&#x80FD;&#x9009;&#x62E9;&#x4E0D;&#x540C;&#x7684;&#x63D0;&#x4EA4;&#x65B9;&#x5F0F;&#x4ECE;&#x800C;&#x5B9E;&#x73B0;&#x4E0D;&#x540C;&#x7684;&#x4F20;&#x8F93;&#x8BED;&#x4E49;&#x3002;</p>
<p>pull &#x6A21;&#x5F0F;&#x4E0D;&#x8DB3;&#x4E4B;&#x5904;&#x662F;&#xFF0C;&#x5982;&#x679C; kafka &#x6CA1;&#x6709;&#x6570;&#x636E;&#xFF0C;&#x6D88;&#x8D39;&#x8005;&#x53EF;&#x80FD;&#x4F1A;&#x9677;&#x5165;&#x5FAA;&#x73AF;&#x4E2D;&#xFF0C;&#x4E00;&#x76F4;&#x7B49;&#x5F85;&#x6570;&#x636E;&#x5230;&#x8FBE;&#x3002;&#x4E3A;&#x4E86;&#x907F;&#x514D;&#x8FD9;&#x79CD;&#x60C5;&#x51B5;&#xFF0C;&#x6211;&#x4EEC;&#x5728;&#x6211;&#x4EEC;&#x7684;&#x62C9;&#x8BF7;&#x6C42;&#x4E2D;&#x6709;&#x53C2;&#x6570;&#xFF0C;&#x5141;&#x8BB8;&#x6D88;&#x8D39;&#x8005;&#x8BF7;&#x6C42;&#x5728;&#x7B49;&#x5F85;&#x6570;&#x636E;&#x5230;&#x8FBE;&#x7684;&#x201C;&#x957F;&#x8F6E;&#x8BE2;&#x201D;&#x4E2D;&#x8FDB;&#x884C;&#x963B;&#x585E;&#xFF08;&#x5E76;&#x4E14;&#x53EF;&#x9009;&#x5730;&#x7B49;&#x5F85;&#x5230;&#x7ED9;&#x5B9A;&#x7684;&#x5B57;&#x8282;&#x6570;&#xFF0C;&#x4EE5;&#x786E;&#x4FDD;&#x5927;&#x7684;&#x4F20;&#x8F93;&#x5927;&#x5C0F;&#xFF09;</p>
<footer class="page-footer"><span class="copyright">Copyright &#xA9; &#x5C1A;&#x7845;&#x8C37;&#x5927;&#x6570;&#x636E; 2019 all right reserved&#xFF0C;powered by Gitbook</span><span class="footer-modification"><br>&#x8BE5;&#x6587;&#x4EF6;&#x6700;&#x540E;&#x4FEE;&#x8BA2;&#x65F6;&#x95F4;&#xFF1A;
2018-11-20 18:14:17
</span></footer>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="33-zookeeper-cun-chu-jie-gou.html" class="navigation navigation-prev " aria-label="Previous page: 3.3 Zookeeper 存储结构">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="35-xiao-fei-zhe-zu-an-li.html" class="navigation navigation-next " aria-label="Next page: 3.5 消费者组案例">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"3.4 Kafka 消费过程分析","level":"1.3.4","depth":2,"next":{"title":"3.5 消费者组案例","level":"1.3.5","depth":2,"path":"di-3-zhang-kafka-gong-zuo-liu-cheng-fen-xi/35-xiao-fei-zhe-zu-an-li.md","ref":"di-3-zhang-kafka-gong-zuo-liu-cheng-fen-xi/35-xiao-fei-zhe-zu-an-li.md","articles":[]},"previous":{"title":"3.3 Zookeeper 存储结构","level":"1.3.3","depth":2,"path":"di-3-zhang-kafka-gong-zuo-liu-cheng-fen-xi/33-zookeeper-cun-chu-jie-gou.md","ref":"di-3-zhang-kafka-gong-zuo-liu-cheng-fen-xi/33-zookeeper-cun-chu-jie-gou.md","articles":[]},"dir":"ltr"},"config":{"plugins":["splitter","expandable-chapters-small","page-toc-button","-highlight","prism","prism-themes","tbfed-pagefooter","sitemap","change_girls","livereload"],"styles":{"website":"styles/website.css","ebook":"styles/ebook.css","pdf":"styles/pdf.css","mobi":"styles/mobi.css","epub":"styles/epub.css"},"pluginsConfig":{"tbfed-pagefooter":{"copyright":"Copyright &copy 尚硅谷大数据 2019","modify_label":"<br>该文件最后修订时间：","modify_format":"YYYY-MM-DD HH:mm:ss"},"prism":{"css":["prismjs/themes/prism-solarizedlight.css"]},"disqus":{"shortName":"zhenchao125"},"livereload":{},"splitter":{},"change_girls":{"time":30,"urls":["http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/imgs/18-3-4/62171757.jpg-atguiguImg","http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/imgs/18-3-4/83394736.jpg-atguiguImg","http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/imgs/18-3-4/15906185.jpg-atguiguImg","http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/imgs/18-3-4/15906185.jpg-atguiguImg","http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/imgs/18-3-4/3394270.jpg-atguiguImg","http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/imgs/18-3-4/65028582.jpg-atguiguImg","http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/imgs/18-3-4/20359261.jpg-atguiguImg","http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/imgs/18-3-4/37472401.jpg-atguiguImg","http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/imgs/18-3-4/3355397.jpg-atguiguImg","http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/imgs/18-3-4/11075549.jpg-atguiguImg"]},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"sitemap":{"hostname":"https://www.gitbook.com/@zhenchao125"},"page-toc-button":{"maxTocDepth":3,"minTocSize":2},"prism-themes":{},"expandable-chapters-small":{},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","author":" 李振超","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"大数据 Fulume 课堂笔记","language":"zh-hans","links":{"sidebar":{"联系我们":"http://www.atguigu.com/"}},"gitbook":"*","description":"课堂笔记,学生提前预习"},"file":{"path":"di-3-zhang-kafka-gong-zuo-liu-cheng-fen-xi/34-kafka-xiao-fei-guo-cheng-fen-xi.md","mtime":"2018-11-20T10:14:17.887Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-01-25T01:42:15.294Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-expandable-chapters-small/expandable-chapters-small.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-page-toc-button/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-change_girls/girls.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

